"""
Created on 2024-07-10
@author:刘飞
@description: Python=3.12
@email:liufei-love@foxmail.com

django 工具集开发 【每次发布须修改版本号】
常用命令
# 导出依赖库
pip list --format=freeze > requirements.txt

# 安装依赖环境
pip install -r requirements.txt

# 打包成wheel格式
python setup.py bdist_wheel

# 发布、上传
twine upload --repository-url https://upload.pypi.org/legacy/  dist/*

# 用户安装
pip install yc_django_utils

# 使用方法【直接导入即可】
from yc_django_utils.xx import xx

"""

from os.path import dirname, join
from sys import version_info

import setuptools

# Python版本检测
if version_info < (3, 12, 4):
    raise SystemExit("Sorry! yc_django_utils requires python 3.12.4 or later.")

# 版本读取
with open(join(dirname(__file__), "VERSION"), "rb") as f:
    version = f.read().decode("ascii").strip()

# 描述
with open("README.md", "rb") as fh:
    long_description = fh.read().decode('utf-8')

# 包
packages = setuptools.find_packages()

# 设置
setuptools.setup(
    name="yc_django_utils",
    version=version,
    author="LiuFei",
    license="MIT",
    author_email="liufei-love@foxmail.com",
    description="Django工具集开发",
    long_description=long_description,
    long_description_content_type="text/markdown",
    install_requires=[
        "django>=5.0.6",
        "djangorestframework>=3.15.2",
        "six>=1.16.0",
        "django-filter>=24.2",
        "drf-spectacular>=0.27.2",
        "djangorestframework-simplejwt>=5.3.1",
        "user-agents>=2.2.0",
        "openpyxl>=3.1.5",
        "django-timezone-field>=7.0"
    ],
    packages=packages,
    include_package_data=True,
    classifiers=[
        # 许可证信息
        'License :: OSI Approved :: MIT License',
        # Python版本
        "Programming Language :: Python :: 3.12"
    ],
)
